You can use aaaaffffSSSSeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn(((()))) to set track position for a marker
structure in a file opened for write access.
EEEEXXXXAAAAMMMMPPPPLLLLEEEE
In AIFF and AIFF-C files, markers are used to delimit loop endpoints.
If you want to define a sustain loop which starts at frame 100000 and
ends at frame 200000 in the above track, you would use two markers. You
would assign the position 99999 to the first marker, and the position
200000 to the second using aaaaffffSSSSeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn(3dm).
Then you would use the routines aaaaffffSSSSeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(3dm) and aaaaffffSSSSeeeettttLLLLooooooooppppEEEEnnnndddd(3dm)
to attach the marker structures to the sustain loop structure. Finally,
you would call aaaaffffSSSSeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(3dm) to map the loop ID to the sustain
loop location in the instrument configuration chunk.
To read loop information out of an audio file, you'd first obtain loop
ID's for the sustain and release loop by calling aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(3dm).
Then you'd obtain marker ID's for the beginning and end points of the
loops by calling aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(3dm) and aaaaffffGGGGeeeettttLLLLooooooooppppEEEEnnnndddd(3dm).
Finally, you would obtain the positions of the individual markers by
It is now possible to retrieve the loop start and end frame directly
without using the associated markers (see aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrttttFFFFrrrraaaammmmeeee(3dm)).
This is useful and necessary for audio file formats which support loops
which are independent of any markers, and for formats which support loops
but which do not support markers at all. For formats which always
associate loops and markers, such as AAAAIIIIFFFFFFFF(4) and WWWWAAAAVVVVEEEE(4),
aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(((()))) and aaaaffffGGGGeeeettttLLLLooooooooppppEEEEnnnndddd(((()))) will always return a valid ID for a
marker, but this marker may have been artifically generated by the AF.
If this is the case, the name of the marker (as retrieved via
aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkNNNNaaaammmmeeee(3dm)) will be "start mark for loop id x" or "end mark for